﻿<UserControl x:Class="EDMDesigner.Designer.Controls.CSDLType.AddPropertyWindows.AddAssociationEnd"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:localControlsCSDLTypeAddPropertyWindows="clr-namespace:EDMDesigner.Designer.Controls.CSDLType.AddPropertyWindows"
    xmlns:uiBusinessAssociationCardinality="clr-namespace:EDMDesigner.UIBusiness.CSDL.Association.Cardinality;assembly=UIBusiness"
    xmlns:localBindindingConverter="clr-namespace:EDMDesigner.Designer.BindingConverter">

    <GroupBox Header="{x:Static localControlsCSDLTypeAddPropertyWindows:AddAssociationEnd.GroupBoxHeader}">
        <Grid VerticalAlignment="Center" Margin="5,10,5,5">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="35" />
                <RowDefinition Height="35" />
                <RowDefinition Height="35" />
            </Grid.RowDefinitions>
            <TextBlock Grid.Column="0" Grid.Row="0" Text="{x:Static localControlsCSDLTypeAddPropertyWindows:AddAssociationEnd.PropertyNameTextBlockText}" Margin="0,10,5,5" />
            <TextBox x:Name="nameTextBox" Grid.Column="1" Grid.Row="0" Text="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type localControlsCSDLTypeAddPropertyWindows:AddAssociationEnd}}, Path=NavigationPropertyName, UpdateSourceTrigger=PropertyChanged}" Height="25" />
            <TextBlock Grid.Column="0" Grid.Row="1" Text="{x:Static localControlsCSDLTypeAddPropertyWindows:AddAssociationEnd.EntityTypeTextBlockText}" Margin="0,10,5,5" />
            <ComboBox Grid.Column="1" Grid.Row="1" IsEditable="True" SelectedItem="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type localControlsCSDLTypeAddPropertyWindows:AddAssociationEnd}}, Path=EntityType, UpdateSourceTrigger=PropertyChanged}" ItemsSource="{Binding Path=EntityTypes}" DisplayMemberPath="Name" Height="25" />
            <TextBlock Grid.Column="0" Grid.Row="2" Text="{x:Static localControlsCSDLTypeAddPropertyWindows:AddAssociationEnd.CardinalityTextBlockText}" Margin="0,10,5,5" />
            <ComboBox x:Name="cardinalityComboBox" Grid.Column="1" Grid.Row="2" IsEditable="True" SelectedItem="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type localControlsCSDLTypeAddPropertyWindows:AddAssociationEnd}}, Path=Cardinality, UpdateSourceTrigger=PropertyChanged}" Height="25" ItemsSource="{x:Static uiBusinessAssociationCardinality:CardinalityList.Instance}" DisplayMemberPath="Text" />
        </Grid>
    </GroupBox>
</UserControl>
